package auctioncentral;

import java.util.List;

import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;

/**
 * tester class for database class.
 * @author Kris
 * @version 3/04/2014
 */
public class DatabaseTests extends Database {
  /**Database to be connected to.*/
  private Database my_test;

  /**
    * creates the database to be connected to.
    */
  @Before
  public void setup() {
    my_test = new Database();
//    List<EventDatabaseHelper> test = my_test.retrieveEventDatabaseHelpers();
//    System.out.println(test.get(1).getMy_name());
//    test.get(1).setMy_name("fuck");
//    my_test.updateEventTable((List<Event>)test);
    
  }

		/**
		 * This test the database to be sure it can connect.
		 */
  @Test
  public void testItem() {
    assertTrue(my_test.isConnected());
  }
  
  /**
   * Tests the connect method for connecting to the database. 
   * @author Kyle Scharnhorst
   */
  @Test
  public void testConnect() {
    final Database d = new Database();
    assertTrue(d.isConnected());
  }
}
